package entities.axiom;

import java.util.HashSet;
import java.util.Set;

import option.KBVocabulary;

import entities.KBEntity;
import entities.concept.Concept;
import entities.role.Role;

public class FeatureDomainAxiom extends RoleAxiom {

	private final Role f;
	private final Concept d;
	
	public FeatureDomainAxiom(Role f, Concept d){
		this.f = f;
		this.d = d;
	}
	
	public Role getFeature(){
		return this.f;
	}
	
	public Concept getDom(){
		return this.d;
	}
	@Override
	public Axiom getPrimeCopy() {
		return new FeatureDomainAxiom(this.f.getPrimeCopy(), this.d.getPrimeCopy());
	}
	@Override
	public String toString(){
		return "("+KBVocabulary.FEAT_DOM+" "+f.toSerializedString()+" "
				+d.toSerializedString()+")";
	}

	@Override 
	public Set<KBEntity> extractSig(){
		Set<KBEntity> sig = new HashSet<KBEntity>();
		sig.addAll(d.extractSig());
		return sig;
	}
}
